package com.bbzn.device.client.service;

import com.bbzn.device.client.dataobject.Product;
import com.bbzn.device.client.dto.index.IndexBuildingDTO;
import com.bbzn.device.client.dto.index.ProductDevCountDTO;
import com.bbzn.device.client.dto.index.SkuHatDTO;
import com.bbzn.device.client.dto.index.WorkSiteDTO;
import com.bbzn.device.client.dto.product.ProductDTO;
import com.bbzn.device.client.dto.product.ProductExistDTO;
import com.bbzn.device.client.utils.PageInfo;

import java.util.List;
import java.util.Map;

public interface ProductService {


    int deleteByPrimaryKey(Long id);

    int insert(Product record);

    int insertOrUpdate(Product record);

    int insertOrUpdateSelective(Product record);

    int insertSelective(Product record);

    Product selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);

    List<Product> selectByAll(Product product);

    int updateBatch(List<Product> list);

    int batchInsert(List<Product> list);

    PageInfo<Product> findAllPageSelective(ProductDTO record);

    List<Product> findByAll(Product product);

    List<Map<String, Object>> getIndexSelf(Long userId);

    List<Map<String, Object>> getIndexAssignment(Long userId);

    IndexBuildingDTO getBuildIndex(Long userId);

    List<WorkSiteDTO> getWorkSiteList(Long userId);

    List<SkuHatDTO> getSkuList(Long userId);

    List<String> getSelfHatSkus(Long userId);

    List<String> getAssignmentHatSkus(Long userId);

    int updateBatchSelective(List<Product> list);

    /**
     * 查询所有产品下有多少设备
     *
     * @param userIds
     * @return
     */
    List<ProductDevCountDTO> getProductByDevList(List<Long> userIds);

    /**
     * 查询所有产品id和名称
     *
     * @return
     */
    List<ProductExistDTO> findByProducts();
}











